<?php

class CSV_Import_Utils {
	static function createFieldMap($headerRow) {
		$map = parse_ini_file('map.ini');
		$data = array();
		foreach ($headerRow as $index=>&$fieldName) {
			if(empty($map[$fieldName])) continue;
			$data[$index] = $map[$fieldName];
		}
		return array_flip($data);
	}
}